package mattkrutsick.android.fitnesstracker;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ChooseWorkoutActivity extends Activity implements OnClickListener{
    /** Called when the activity is first created. */
	Button Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, Back;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.chooseworkout);
          //Create instances of the 8 buttons on this screen
        Monday=(Button)findViewById(R.id.button1);
        Tuesday=(Button)findViewById(R.id.button2);
        Wednesday=(Button)findViewById(R.id.button3);
        Thursday=(Button)findViewById(R.id.button4);
        Friday=(Button)findViewById(R.id.button5);
        Saturday=(Button)findViewById(R.id.button6);
        Sunday=(Button)findViewById(R.id.button7);
        Back=(Button)findViewById(R.id. button8);
       //create listeners for each of the buttons if it is clicked
        Monday.setOnClickListener(this);
        Tuesday.setOnClickListener(this);
        Wednesday.setOnClickListener(this);
        Thursday.setOnClickListener(this);
        Friday.setOnClickListener(this);
        Saturday.setOnClickListener(this);
        Sunday.setOnClickListener(this);
        Back. setOnClickListener(this);
    }
    public void onClick(View arg0) {
		// TODO Auto-generated method stub
		if(Monday.isPressed())
			startActivity(new Intent(ChooseWorkoutActivity.this, AddExActivity.class));
		//ChooseWorkoutActivity.this.finish();
		
	    if(Tuesday.isPressed())
			startActivity(new Intent(ChooseWorkoutActivity.this, AddExActivity.class));
	  //ChooseWorkoutActivity.this.finish();
	   
		if(Wednesday.isPressed())
			startActivity(new Intent(ChooseWorkoutActivity.this, AddExActivity.class));
		//ChooseWorkoutActivity.this.finish();
		
	    if(Thursday.isPressed())
			startActivity(new Intent(ChooseWorkoutActivity.this, AddExActivity.class));
	  //ChooseWorkoutActivity.this.finish();
	   
		if(Friday.isPressed())
			startActivity(new Intent(ChooseWorkoutActivity.this, AddExActivity.class));
		//ChooseWorkoutActivity.this.finish();
		
	    if(Saturday.isPressed())
			startActivity(new Intent(ChooseWorkoutActivity.this, AddExActivity.class));
	  //ChooseWorkoutActivity.this.finish();
	   
		if(Sunday.isPressed())
			startActivity(new Intent(ChooseWorkoutActivity.this, AddExActivity.class));
		//ChooseWorkoutActivity.this.finish();
		if(Back.isPressed()){
			startActivity(new Intent(ChooseWorkoutActivity.this, HomeScreenActivity.class));
		ChooseWorkoutActivity.this.finish();
		}
	}
}
